package com.kai.steering.data.service.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kai.steering.data.service.entity.domainObject.QuestionDO;
import com.kai.steering.data.service.entity.po.Question;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.core.conditions.Wrapper;

import java.io.Serializable;

/**
 * <pre>
 * 题目 Mapper 接口
 * </pre>
 *
 * @author kai
 * @since 2022-02-23
 */
@Repository
public interface QuestionMapper extends BaseMapper<Question> {

    /**
     * 根据ID获取查询对象
     *
     * @param id
     * @return
     */
    QuestionDO getQuestionById_All(Serializable id);

    /**
     * 获取分页对象
     *
     * @param page
     * @param queryWrapper
     * @return
     */
    IPage<Question> getQuestionPageList(IPage<Question> page, @Param(Constants.WRAPPER) Wrapper<Question> queryWrapper);

    /**
     * 根据ID获取查询对象——视图
     * 题目、分类、知识点、用户与题目
     * @param questionId
     * @return
     */
    QuestionDO getQuestionById_VO(Serializable questionId);
}
